Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
react-devtools-core
Advanced tools
The react-devtools-core package provides the core functionality of React Developer Tools, which are used to inspect and debug React component hierarchies in the Chrome Developer Tools. It can be integrated into other environments, such as custom browsers, editors, or embedded inside apps.
Standalone React DevTools
This code snippet demonstrates how to connect to the React DevTools from a standalone environment. It is useful when you want to debug React components within an environment that is not a web browser.
const { connectToDevTools } = require('react-devtools-core');
connectToDevTools({ host: 'localhost', port: 8097 });
Custom Integration
This code snippet shows how to start a React DevTools server. This can be used to integrate React DevTools into an environment where you have control over the server, such as an Electron app or a custom browser.
const { Server } = require('react-devtools-core');
const server = new Server({ port: 8097 });
server.on('ready', () => console.log('DevTools server started on port 8097.'));
server.start();
This package provides tools for debugging application's state changes. While react-devtools-core is focused on React component hierarchies, redux-devtools-extension is focused on Redux state management.
Similar to react-devtools-core, this package is used for debugging React applications. However, it is specifically tailored for applications using MobX for state management, as opposed to React's context or Redux.
Vue Devtools is for Vue.js applications what react-devtools-core is for React applications. It allows developers to inspect and debug Vue component hierarchies.
react-devtools-core
A standalone React DevTools implementation.
This is a low-level package.
If you're looking for the Electron app you can run, use react-devtools
package instead.
require('react-devtools-core').connectToDevTools(options)
This is similar to require('react-devtools')
in another package but providing more control.
Unlike require('react-devtools')
, it doesn't connect immediately, but exports a function.
Run connectToDevTools()
in the same context as React to set up a connection to DevTools.
Make sure this runs before any react
, react-dom
, or react-native
imports.
The options
object may contain:
host
(string), defaults to 'localhost'
.port
(number), defaults to 8097
.resolveRNStyle
(function), used by RN and null
by default.None of the options are required.
require('react-devtools-core/standalone')
Lets you render DevTools into a DOM node and have it listen to connections.
For example:
require('react-devtools-core/standalone')
.setContentDOMNode(document.getElementById('container'))
.startServer(port);
You can check the Electron shell in react-devtools
package for a complete integration example.
FAQs
Use react-devtools outside of the browser
We found that react-devtools-core demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 11 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.